#include<iostream>
#include<unistd.h>
#include<signal.h>

int gflag = 0;
void changedata(int signo)
{
    std::cout<<"get a signo: "<<signo<<", change gflag: 0->1"<<std::endl;
    gflag = 1;
}
int main()
{
    signal(2,changedata);
    while(!gflag);  
    std::cout<<"process normol quit..."<<std::endl;
    return 0;
}

